package com.xiangyi.teachingsystem.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.sql.Timestamp;

@Data
@NoArgsConstructor
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CourseRes {
    //自增主键
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    //课程标识
    @NotNull(message = "courseId不能为空")
    private Integer courseId;
    //资源名称
    @NotNull(message = "resName不能为空")
    private String resName;
    //资源地址
    @NotNull(message = "resAddress不能为空")
    private String resAddress;
    //上传时间
    @NotNull(message = "gmtCreate不能为空")
    private Timestamp gmtCreate;

    @NotNull(message = "resSize不能为空")
    private String resSize;

    @TableField(exist = false)
    private String resCourseName;
}
